home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_13249.txt < prev    next >
Text File  |  1991-02-27  |  1KB  |  30 lines

  1. -- card: 13249 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10.     void    set(void);
  11.     void    print(void);
  12.  
  13. As mentioned above, class definitions in TC may declare what methods are members of the class.  This declaration for the set() method is a little different from the one used in the beginning of this chapter*.  In C, all procedures are functions, which may RETURN a value upon completion.  If we wish to declare a function which does not return a value, we say it returns 'void'.  The declaration for the set() method also indicates that this function has no ARGUMENTS; i.e., a void argument.  It is good practice to explicitly state the types of values accepted by and returned by C functions, to allow the compiler to enforce type-checking.
  14.  
  15.  
  16. -- part contents for background part 7
  17. ----- text -----
  18. 24
  19.  
  20. -- part contents for background part 29
  21. ----- text -----
  22. 7205
  23.  
  24. -- part contents for background part 27
  25. ----- text -----
  26. Previous declaration
  27.  
  28. -- part contents for background part 20
  29. ----- text -----
  30. Previous declaration - p13